<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@include file="/comm/header.jsp"%>
<div class="container">
    <div class="panel panel-default">
        <div class="panel-heading">
            <h3 class="panel-title">条件查询</h3>
        </div>
        <div class="panel-body">
            <form class="form-inline" id="condition">
                <div class="form-group">
                     <label>用户名：</label>
                    <input type="text" name="name" class="form-control"/>
                    <label>修改时间：</label>
                    <div class="input-group">
                        <input type="date" name="startDate" class="form-control"/>
                        <span class="input-group-addon">—</span>
                        <input type="date" name="endDate" class="form-control"/>
                    </div>
                    <button type="button" class="btn btn-danger" onclick="search()"><i class="fa fa-search"></i> 查询</button>
                </div>
            </form>
        </div>
    </div>
    <div id="toolbar">
        <a class="btn btn-danger" href="javascript:"><i class="fa fa-trash"></i> 批量删除</a>
        <a class="btn btn-success" href="javascript:grant()"><i class="fa fa-lock"></i> 用户授权</a>
    </div>
    <table id="userTb"
            data-toggle="table"
            data-url="sys/user/pager"
            data-striped="true"
            data-toolbar="#toolbar"
            toolbarAlign="right"
            data-pagination="true"
            data-side-pagination="server"
            data-page-size="5"
            data-page-list="[5,10,15]"
            data-query-params="queryParams">
        <thead>
        <tr>
            <th data-checkbox="true"></th>
            <th data-field="name">用户名称</th>
            <th data-field="state" data-formatter="fmtState">状态</th>
            <th data-field="tel">电话</th>
            <th data-field="modifyTime">修改时间</th>
            <th data-formatter="fmtOpt" data-events="eventObj" data-field="id">
            </th>
        </tr>
        </thead>
    </table>

    <div id="grant" style="height: 350px">
        <table id="roleTb"
               data-toggle="table"
               data-url="sys/role/search"
               data-striped="true"
              >
            <thead>
            <tr>
                <th data-radio="true"></th>
                <th data-field="name">角色名称</th>
                </th>
            </tr>
            </thead>
        </table>
    </div>
</div>
<%@include file="/comm/footer.jsp"%>
<script src="${ctx}/static/js/user.js"></script>